﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Users.aspx.cs" Inherits="MedicareNoteManagerWeb.Web.Users" %>

<%@ Register assembly="Comm" namespace="Comm" tagprefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
      <link href="../Css/TableStyle.css" rel="stylesheet" type="text/css" />
       <link href="../lib/ligerUI/skins/Gray/css/all.css" rel="stylesheet" />
      <link href="../lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
       <script src="../lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script> 
    <script src="../lib/ligerUI/js/core/base.js" type="text/javascript"></script>
    <script src="../lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
    <script src="../lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
    <script src="../lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
    <script src="../lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
    <script src="../../lib/ligerUI/js/plugins/ligerDrag.js" type="text/javascript"></script> 
    <script src="../../lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
    <style type="text/css">
        .style1
        {
            width: 967px;
            text-align: right;
        }
    </style>
     <script type="text/javascript">
             $(function ()
        { 
            $("#FindDropArea").ligerComboBox(); 
        });

            $(function ()
        { 
            $("#DropArea").ligerComboBox();
        });

        var win1;
        function f_open() {
            if (win1) win1.show();
            else win1 = $.ligerDialog.open({ height: 400, url: 'Users_add.aspx', width: 600, showMax: true, showToggle: true, showMin: true, isResize: true, slide: false });
        }
     </script>

</head>
<body>
    <form id="form1" runat="server">
    <div  style="height: 351px" class="liger-form">
        <center>
            <div style="width:96%;">
                <table style="width:100%; margin-top:3%;">
                <tr>
                    <td align="left" colspan="5">
                        <asp:Label ID="Label1" runat="server" Text="用户管理" Font-Bold="True" 
                            Font-Size="XX-Large" ForeColor="Gray"></asp:Label>
                    </td>
                </tr>
            <tr>
                <td>
                <asp:Label ID="lbl_Message" runat="server"></asp:Label>
                </td>
                <td align="center" style="width:180px;">
                用户名：
                <asp:TextBox ID="txt_FindUser" CssClass="l-text" runat="server" Width="100px" ></asp:TextBox>
                </td>
                <td align="right" style="width:150px;">
                <asp:DropDownList ID="FindDropArea" CssClass="l-checkbox" runat="server" Width="100px">
                    </asp:DropDownList>
                </td>
                <td align="right" style="width:60px;">
                    <asp:Button ID="Button1" runat="server" CssClass="l-button" Text="查询" Width="55px" 
                        onclick="Button1_Click" />
                </td>
                <td align="right" style="width:60px">
                    <input type="button" size="120" onclick="f_open()" class="l-button" value="添加用户" />
                </td>
            </tr>
            <tr>
                <td class="style2" colspan="5" style="padding-top:1%">
     <asp:GridView ID="Grd_User" runat="server" CssClass="l-grid" AutoGenerateColumns="False" Width="100%" 
            OnRowDeleting="Grd_User_RowDeleting" DataKeyNames="UserID" OnRowCancelingEdit="Grd_User_RowCancelingEdit" 
            OnRowEditing="Grd_User_RowEditing"  OnRowDataBound="Grd_User_RowDataBound" OnRowUpdating="Grd_User_RowUpdating" 
            AllowSorting="True" OnPageIndexChanging="Grd_User_PageIndexChanging" 
                        AllowPaging="True" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" 
                        BorderWidth="1px" CellPadding="3" >
         <EmptyDataTemplate>
                <div style="background-color: #FFFFD6; color: #ff0000; text-align: center; font-size: 18px">
                    暂时没有数据!
                </div>
            </EmptyDataTemplate>
          <AlternatingRowStyle CssClass="l-grid-row" />
          <Columns> 
                    <asp:TemplateField HeaderText="用户名">
                        <ControlStyle CssClass="l-grid" />
                        <ItemStyle Width="15%" />
                        <ItemTemplate>
                        <asp:Label runat="server" ID="lbUserName" Text='<%# Eval("LoginName") %>'></asp:Label>
                        </ItemTemplate>
                            <EditItemTemplate>
                        <asp:TextBox ID="txtUserName" runat="server" Text='<%# Bind("LoginName") %>' Width="131px"></asp:TextBox>
                    </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="密码">
                        <ControlStyle CssClass="l-grid-row"/>
                        <ItemStyle Width="15%" />
                    <ItemTemplate>
                    <asp:Label runat="server" ID="lbPassWord" Text='<%# Eval("LoginPassword") %>'></asp:Label>
                    </ItemTemplate>
                       <EditItemTemplate>
                        <asp:TextBox ID="txtPassWord" runat="server" Text='<%# Bind("LoginPassword") %>'></asp:TextBox>
                    </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="所属地" >
                        <ControlStyle  CssClass="l-grid-row" />
                        <ItemStyle Width="35%" />
                    <ItemTemplate>
                       <asp:Label runat="server" ID="lbEarth" Text='<%# Eval("AreaName") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:DropDownList ID="ddlEarth" runat="server">
                        </asp:DropDownList>
                             </EditItemTemplate>
                    </asp:TemplateField>
               <asp:CommandField ShowEditButton="True" >
                 
                    <ItemStyle Width="10%" HorizontalAlign="Center" ForeColor="#0000D8" />
                    </asp:CommandField>
                 
            <asp:CommandField ShowDeleteButton="True">
                <ItemStyle Width="10%" HorizontalAlign="Center" ForeColor="#0000D8" />
            </asp:CommandField> 
        </Columns>
         <FooterStyle BackColor="White" ForeColor="#000066" />
         <HeaderStyle CssClass="l-grid-row" BackColor="#006699" Font-Bold="True" 
             ForeColor="White" />
         <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Right" />
         <PagerTemplate>
                当前第:
                <asp:Label ID="LabelCurrentPage" runat="server" Text="<%# ((GridView)Container.NamingContainer).PageIndex + 1 %>"></asp:Label>
                页/共:
                <asp:Label ID="LabelPageCount" runat="server" Text="<%# ((GridView)Container.NamingContainer).PageCount %>"></asp:Label>
                页
                <asp:LinkButton ID="LinkButtonFirstPage" runat="server" CommandArgument="First" CommandName="Page"
                    Visible='<%#((GridView)Container.NamingContainer).PageIndex != 0 %>'>首页</asp:LinkButton>
                <asp:LinkButton ID="LinkButtonPreviousPage" runat="server" CommandArgument="Prev"
                    CommandName="Page" Visible='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'>上一页</asp:LinkButton>
                <asp:LinkButton ID="LinkButtonNextPage" runat="server" CommandArgument="Next" CommandName="Page"
                    Visible='<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>'>下一页</asp:LinkButton>
                <asp:LinkButton ID="LinkButtonLastPage" runat="server" CommandArgument="Last" CommandName="Page"
                    Visible='<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>'>尾页</asp:LinkButton>
                转到第
                <asp:TextBox ID="txtNewPageIndex" runat="server" Width="20px" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1 %>' />页
                <asp:LinkButton ID="btnGo" runat="server" CausesValidation="False" CommandArgument="-2"
                    CommandName="Page" Text="GO" />
            </PagerTemplate>
         <RowStyle CssClass="l-grid-row" ForeColor="#000066" />
         <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
         <SortedAscendingCellStyle BackColor="#F1F1F1" />
         <SortedAscendingHeaderStyle BackColor="#007DBB" />
         <SortedDescendingCellStyle BackColor="#CAC9C9" />
         <SortedDescendingHeaderStyle BackColor="#00547E" />
        </asp:GridView>
                </td>
            </tr>
        </table>
            </div>
        </center>
    </div>
    </form>
</body>
</html>
